package org.zfes.snowier.cloud.zbss.tts.vo;

import java.io.Serializable;
import java.util.Map;

import com.google.common.collect.Maps;

public class JsonMsg implements Serializable{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String msg;
	private Integer code;
	private Map<String,Object> data=Maps.newHashMap();
	
	
	public JsonMsg() {
		super();
	}
	
	public JsonMsg(String msg) {
		super();
		this.msg = msg;
		this.code = 200;
	}
	
	public JsonMsg( Integer code,String msg) {
		super();
		this.msg = msg;
		this.code = code;
	}
	public JsonMsg(String msg, Integer code) {
		super();
		this.msg = msg;
		this.code = code;
	}
	
	public JsonMsg(String msg, Integer code, Map<String, Object> data) {
		super();
		this.msg = msg;
		this.code = code;
		this.data = data;
	}
	public String getMsg() {
		return msg;
	}
	public JsonMsg setMsg(String msg) {
		this.msg = msg;
		return this;
	}
	public Integer getCode() {
		return code;
	}
	public JsonMsg setCode(Integer code) {
		this.code = code;
		return this;
	}
	public Map<String, Object> getData() {
		return data;
	}
	public JsonMsg setData(Map<String, Object> data) {
		this.data = data;
		return this;
	}
	
	public JsonMsg put(String key,Object value) {
		this.data.put(key, value);
		return this;
	}
	
}
